﻿* Encoding: UTF-8.

********************************************************************************************************************************************************************************************************************************************
*    
*   STUDY 1-- DID SCORES INCREASE 2017 TO 2020                                                                                                                                                                                                                      *
*
**********************************************************************************************************************************************************************************************************************************************

GET
  FILE='C:\Users\ksmith1\Dropbox\Politics and Health\Data\Master Data and Codebooks\Working Data\PLoS Replication Posted on Dataverse\merged20172020data.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.

***replace file path with local information to call data set "merged20172020data.sav" 

weight by weight_w1

*the above is the weight supplied by YouGov to insure representativeness. Not using the weight does not seem to substantively change anything in terms of results/inference, though there are some trivial changes in coefficients/R2 etc



****************************************Table 1 Regressions**************************************************************************************************


REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT full_32item_health1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.


REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Health_6_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.



REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Compulsion_Battery1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.



REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Social_Lifestyle_8_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.



REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Emotional_8_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.



REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT political_malady_additive1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age.





********************************************************TABLE S1/S2/S3***************************************************************************************************
    


*difference of means test for individual items and all batteries 2017 vs 2020--this used to report mean/SDs and difference of means tests in Tables S1, S2 and S3 in supplementary materials


T-TEST GROUPS=sample_ID(1 0)
  /MISSING=ANALYSIS
  /VARIABLES=Q27 Q28 Q29 Q30 Q31 Q32 Q33 Q34 Q35 Q36 Q37 Q38 Q39 Q40 Q41 Q42 Q43 Q44 Q45 Q46 Q47
    Q48 Q49 Q50 Q51 Q52 Q53 Q54 Q55 Q56 Q57 Q58 Compulsion_Battery1720 Social_Lifestyle_8_item1720
    Health_6_item1720 Emotional_8_item1720 political_malady_additive1720 full_32item_health1720 dem_ind_rep newsint other_guy_index male black age
  /CRITERIA=CI(.95).




**reliability tests for all scales--this is used to generate the chronbachs alphas reported in Table S2 of the supplementary materials
   
SPLIT FILE SEPARATE BY sample_ID.


* health scale

RELIABILITY
  /VARIABLES=Q27 Q28 Q29 Q30 Q31 Q32
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.

*social lifestyle scale

RELIABILITY
  /VARIABLES=q51 q52 q53 q54 q55 q56 q57 q58
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.


* emotional sub scale

RELIABILITY
  /VARIABLES=q33 q34 q35 q36 q37 q38 q39 q40
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.

*compulsion battery
    
RELIABILITY
  /VARIABLES=q41 q42 q43 q44  q45 q46 q47 q48 q49 q50
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.

*10 item short form

RELIABILITY
  /VARIABLES=q27 q28 q29 q33 q34 q35 q36 q41 q42 q51
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.

*full 32 tiem

RELIABILITY
  /VARIABLES=Q27 Q28 Q29 Q30 Q31 Q32 Q33 Q34 Q35 Q36 Q37 Q38 Q39 Q40 Q41 Q42 Q43 Q44 Q45 Q46 Q47
    Q48 Q49 Q50 Q51 Q52 Q53 Q54 Q55 Q56 Q57 Q58
  /SCALE('ALL VARIABLES') ALL
  /MODEL=ALPHA.


split file off.





******************************************Table S4 -- INTERACTION MODELS   REPORTED IN SUPPLEMENTARY MATERIALSl**************************************************************************************************
    

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT full_32item_health1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear.

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Health_6_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Compulsion_Battery1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Social_Lifestyle_8_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT Emotional_8_item1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT political_malady_additive1720
  /METHOD=ENTER dem_ind_rep newsint other_guy_index male sample_ID black age 
blackXyear
ageXyear
pidXyear
genderXyear
interestXyear


*************************************************Table S5/S6/S7*************************************************************************************************************************************************************************************
  
GET
  FILE='C:\Users\ksmith1\Dropbox\Politics and Health\Data\Master Data and Codebooks\Working Data\pre_post_election_data.sav'.
DATASET NAME DataSet2 WINDOW=FRONT. 

WEIGHT BY weight_w2.


T-TEST PAIRS= Q27 Q28 Q29 Q30 Q31 Q32 Q33 Q34 Q35 Q36 Q37 Q38 Q39 Q40 Q41 Q42 Q43 Q44 Q45
    Q46 Q47 Q48 Q49 Q50 Q51 Q52 Q53 Q54 Q55 Q56 Q57 Q58 Health_6_item Social_Lifestyle_8_item Emotional_8_item Compulsion_Battery political_malady_additive full_32item_health WITH 
    Q39_w2 Q40_w2 Q41_w2 Q42_w2 Q43_w2 Q44_w2 Q45_w2 Q46_w2 Q47_w2 Q48_w2 Q49_w2
    Q50_w2 Q51_w2 Q52_w2 Q53_w2 Q54_w2 Q55_w2 Q56_w2 Q57_w2 Q58_w2 Q59_w2 Q60_w2 Q61_w2 Q62_w2 Q63_w2
    Q64_w2 Q65_w2 Q66_w2 Q67_w2 Q68_w2 Q69_w2 Q70_w2 W2_Health_6_item W2_Social_Lifestyle_8_item W2_Emotional_8_item W2_Compulsion_Battery W2_political_malady_additive W2_full_32item_health (PAIRED)
  /CRITERIA=CI(.9500)
  /MISSING=ANALYSIS.



descriptives variables = age
male
black
dem_ind_rep
neg_part_score
resilience_score
newsint
Trump20_vote
Pre_vote_trump
political_knowledge
political_participation
    /statistics = mean stdev

descriptives variables =  Q39_w2 Q40_w2 Q41_w2 Q42_w2 Q43_w2 Q44_w2 Q45_w2 Q46_w2 Q47_w2 Q48_w2 Q49_w2
    Q50_w2 Q51_w2 Q52_w2 Q53_w2 Q54_w2 Q55_w2 Q56_w2 Q57_w2 Q58_w2 Q59_w2 Q60_w2 Q61_w2 Q62_w2 Q63_w2
    Q64_w2 Q65_w2 Q66_w2 Q67_w2 Q68_w2 Q69_w2 Q70_w2 W2_Health_6_item W2_Social_Lifestyle_8_item W2_Emotional_8_item W2_Compulsion_Battery W2_political_malady_additive W2_full_32item_health
     /statistics = mean stdev


weight off.






